let dl = new Vue({
    el: "#dl",
    data: {
        departments: []
        // ,content:""
    },
    methods: {
        loadDepartments: function () {
            axios({
                url: '/portal/departmentOffice/dol',
                method: "GET"
            }).then(function (response) {
                dl.departments = response.data
            })
        },
        deleteDepartment:function (id) {
            console.log(id);
            axios({
                url:'/portal/departmentOffice/delete',
                method:"get",
                params:{
                    Id:id
                }
            }).then(function () {
                location.href="/pages/department/department-list.html"
            })
        }
    },
    mounted: function () {
        this.loadDepartments();
    }
})